//
//  NSString+Extension.h
//  解税宝
//
//  Created by 边文辉 on 2016/10/27.
//  Copyright © 2016年 jieshuibao. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface NSString (Extension)

/**
 * 是否为空
 */
+ (BOOL)isBlank:(NSString *)str;
- (BOOL)isBlank;

/**
 * 是否手机号
 */
//+ (BOOL)isTelephones:(NSString *)string;
+ (BOOL)checkTelNumber:(NSString *) telNumber;

/**
 * 是否电话号码
 */
+ (BOOL)isPhoneNumber:(NSString *)string;


/**
 * 是否6-15位数字和字母组合的密码
 */
+ (BOOL)checkPassword:(NSString *) password;

+ (NSString *)encodeString:(NSString *)string;
+ (NSString *)decodeString:(NSString *)string;
- (NSString *)encodeURLString;
- (NSString *)decodeURLString;

//判断是否为整形：
- (BOOL)isPureInt;

//判断是否为浮点形：
- (BOOL)isPureFloat;

+(NSString *)dictionaryToJson:(NSDictionary *)dic;

/**
 *	Convert the string to 32bit md5 string.
 *
 *	@return 32bit md5
 */
- (NSString *)hyb_toMD5;


//获取字符串的宽度
+(float) widthForString:(NSString *)value fontSize:(float)fontSize andHeight:(float)height;

/**
 *含逗号的字符串转数组
 */
+ (NSArray *)stringFromStr:(NSString *)string;

@end
NS_ASSUME_NONNULL_END
